package net.ak.service;

import java.util.List;

import net.ak.model.Category;

public interface CategoryService {
	
	/**
	 * This method is used to get all {@link Category}.
	 * @return
	 */
	List<Category> listCategories();
	
	/**
	 * This method is used to save or update {@link Category}.
	 * @param category
	 * @return
	 */
	boolean saveOrUpdate(Category category);
	
	/**
	 * This method is used to get {@link Category} by name.
	 * @param categoryName
	 * @return
	 */
	Category getCategoryByName(String categoryName);
	
	
	/**
	 * This method is used to get {@link Category} by id.
	 * @param id
	 * @return
	 */
	Category getCategoryById(Long id);
	
	/**
	 * This method is used to search {@link Category} by name.
	 * @param categoryName
	 * @return
	 */
	List<Category> searchCategoryByName(String categoryName);
}
